package com.ss.android.newmedia.message;

import android.text.TextUtils;

import com.ss.android.common.AbsApiThread;

import org.json.JSONException;
import org.json.JSONObject;

public final class h {
    public final class a {
        public b a;
        public int b;
        public int c;
        public boolean d;
        private JSONObject e;

        public a(String arg7) {
            JSONObject v3;
            b v2_1;
            boolean v2;
            boolean v0 = true;

            this.b = 0;
            this.c = 0;
            this.d = false;
            try {
                if(TextUtils.isEmpty(((CharSequence)arg7))) {
                    this.a = new b();
                    return;
                }

                this.e = new JSONObject(arg7);
                this.b = this.e.optInt("stick_top", 0);
                this.c = this.e.optInt("image_style", 0);
                if(this.e.optInt("is_stick_screen_top", 0) > 0) {
                    v2 = true;
                } else {
                    v2 = false;
                }

                this.d = v2;
                this.a = new b();
                v2_1 = this.a;
                v3 = this.e.optJSONObject("rule_desc");
                if(v3 == null) {
                    return;
                }

                if(v3.optInt("strong", 0) != 1) {
                    v0 = false;
                }
                v2_1.a = v0;
                v3.optLong("st");
            }
            catch(JSONException v0_1) {
            label_49:
                v0_1.printStackTrace();
                this.a = new b();
            }
        }
    }

    public final class b {
        public boolean a;

        public b() {

            this.a = false;
        }

        public b(JSONObject arg4) {
            boolean v0 = true;

            this.a = false;
            if(arg4 != null) {
                if(arg4.optInt("strong", 0) != 1) {
                    v0 = false;
                }

                this.a = v0;
            }
        }
    }

    public JSONObject a;
    public int b;
    public int c;
    public String d;
    public String e;
    public String f;
    public int g;
    public int h;
    public int i;
    public String j;
    public int k;
    public int l;
    public String m;
    public boolean n;
    public JSONObject o;
    public boolean p;
    public boolean q;
    public boolean r;
    public String s;
    public a t;
    public boolean u;
    public boolean v;
    public boolean w;
    public int x;
    public String y;

    public h(JSONObject arg5) {
        JSONObject v0 = null;

        this.b = 1;
        this.c = 1;
        this.d = "";
        this.e = "";
        this.f = "";
        this.g = 0;
        this.h = 0;
        this.i = 0;
        this.j = "";
        this.k = 0;
        this.l = 0;
        this.m = "";
        this.n = false;
        this.o = v0;
        this.p = false;
        this.s = "";
        this.u = false;
        this.v = false;
        this.w = false;
        this.x = -1;
        this.y = "";
        this.a = arg5;
        String v0_1 = null;
        if(arg5 != null) {
            v0_1 = arg5.optString("open_url");
        }

        this.m = ((String)v0_1);
        this.b = arg5.optInt("pass_through", 1);
        this.c = arg5.optInt("filter", 1);
        this.d = arg5.optString("text");
        this.e = arg5.optString("title");
        this.f = arg5.optString("image_url");
        this.g = arg5.optInt("image_type", 0);
        this.h = arg5.optInt("lock_type", 0);
        this.i = arg5.optInt("id", 0);
        this.j = arg5.optString("callback");
        this.k = arg5.optInt("is_ping", 0);
        this.l = arg5.optInt("alert_type", 0);
        boolean v0_2 = arg5.optInt("preload_article", 0) > 0 ? true : false;
        this.n = v0_2;
        this.o = arg5.optJSONObject("app_data");
        this.s = arg5.optString("post_back");
        this.t = new a(arg5.optString("extra_str"));
        this.p = AbsApiThread.optBoolean(arg5, "use_led", false);
        this.q = AbsApiThread.optBoolean(arg5, "sound", false);
        this.r = AbsApiThread.optBoolean(arg5, "use_vibrator", false);
    }

    public final boolean a() {
        boolean v0 = (this.u) || (this.v) || (this.w) ? true : false;
        return v0;
    }
}

